/**
 * Created by Administrator on 2017/4/17.
 */
var class1 =function(name){
    this._name = name
};
class1.prototype.say =function(){
    console.log('class1.say'+this._name)
};

//继承
var class2=function(name){
    this._name = name
};
class2.prototype = new class1();
var temp =class2.prototype.say;
class2.prototype.say =function(){
    temp();
    temp.call(this);
    console.log('class2.say'+this._name)
};

//类引用
var test = new class2('tokky');
test.say();
